<extend name="Base/base" />
<block name="button">	
	<button class="btn btn-primary" type="submit" form="form"><i class="fa fa-save"></i> {:L('text_save')}</button>
</block>
<block name="body">
	<if condition="$msg">
		<div class="alert alert-danger alert-dismissible fade in" role="alert">
		      <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
		      {$msg.warning}
		</div>
	</if>
	<div class="panel panel-default">
		<div class="panel-heading">
			<h4><i class="fa fa-pencil fa-fw"></i>  {$heading_title}</h4>
		</div>
		<div class="panel-body">
			<form action="" method="post" id="form" class="form-horizontal">
				<div class="form-group required">
					<label for="input-name" class="col-sm-2 control-label">{:L('entry_name')}</label>
					<div class="col-sm-10">
						<input type="text" minlength="2" name="name" maxlength="50" required="required" placeholder="{:L('entry_name')}" value="{$language.name|default=''}" class="form-control" id="input-name">
						<if condition="isset($msg['name'])">
						{:danger_msg($msg['name'])}
						</if>
					</div>					
				</div>
				<div class="form-group required">
					<label for="input-code" class="col-sm-2 control-label">{:L('entry_code')}</label>
					<div class="col-sm-10">
						<input name="code" type="text" minlength="5" maxlength="5" required="required" placeholder="{:L('entry_code')}" value="{$language.code|default=''}" class="form-control" id="input-code">
						<if condition="isset($msg['code'])">
						{:danger_msg($msg['code'])}
						</if>
					</div>
				</div>
				<div class="form-group">
					<label for="input-locale" class="col-sm-2 control-label">{:L('entry_locale')}</label>
					<div class="col-sm-10">
						<input type="text" name="locale" placeholder="{:L('entry_locale')}" value="{$language.locale|default=''}" class="form-control" id="input-locale">
						<if condition="isset($msg['locale'])">
						{:danger_msg($msg['locale'])}
						</if>
					</div>					
				</div>
				<div class="form-group required">
					<label for="input-image" class="col-sm-2 control-label">{:L('entry_image')}</label>
					<div class="col-sm-10">
						<input type="text" placeholder="{:L('entry_image')}" name="image" required="required" minlength="5" maxlength="20" value="{$language.image|default=''}" class="form-control" id="input-locale">
						<if condition="isset($msg['image'])">
						{:danger_msg($msg['image'])}
						</if>
					</div>					
				</div>
				<div class="form-group required">
					<label for="input-directory" class="col-sm-2 control-label">{:L('entry_directory')}</label>
					<div class="col-sm-10">
						<input type="text" name="directory" placeholder="{:L('entry_directory')}" required="required" minlength="2" maxlength="20" value="{$language.directory|default=''}" class="form-control" id="input-directory">
						<if condition="isset($msg['directory'])">
						{:danger_msg($msg['directory'])}
						</if>
					</div>					
				</div>
				<div class="form-group required">
					<label for="input-filename" class="col-sm-2 control-label">{:L('entry_filename')}</label>
					<div class="col-sm-10">
						<input type="text" name="filename" placeholder="{:L('entry_filename')}" required="required" minlength="2" maxlength="20" value="{$language.filename|default=''}" class="form-control" id="input-filename">
						<if condition="isset($msg['filename'])">
						{:danger_msg($msg['filename'])}
						</if>
					</div>					
				</div>
				<div class="form-group">
					<label for="input-sort-order" class="col-sm-2 control-label">{:L('entry_sort_order')}</label>
					<div class="col-sm-10">
						<input type="number" class="form-control" value="{$language['sort_order']|default=''}"  id="input-sort-order" name="sort_order" placeholder="{:L('entry_sort_order')}">
					</div>					
				</div>	
				<div class="form-group">
					<label for="input-status" class="control-label col-sm-2">{:L('entry_status')}</label>
					<div class="col-sm-10">
						<select name="status" id="input-status" class="form-control">
							<option value="1">{:L('text_enabled')}</option>
							<option <if condition="isset($language['status']) && ($language['status'] eq 0)">selected</if> value="0">{:L('text_disabled')}</option>						
						</select>
					</div>
				</div>
			</form>
		</div>
	</div>
</block>
